package org.hxyjs.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class ActivetyrecordExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public ActivetyrecordExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        protected void addCriterionForJDBCTime(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Time(value.getTime()), property);
        }

        protected void addCriterionForJDBCTime(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Time> timeList = new ArrayList<java.sql.Time>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                timeList.add(new java.sql.Time(iter.next().getTime()));
            }
            addCriterion(condition, timeList, property);
        }

        protected void addCriterionForJDBCTime(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Time(value1.getTime()), new java.sql.Time(value2.getTime()), property);
        }

        public Criteria andAfnoIsNull() {
            addCriterion("afno is null");
            return (Criteria) this;
        }

        public Criteria andAfnoIsNotNull() {
            addCriterion("afno is not null");
            return (Criteria) this;
        }

        public Criteria andAfnoEqualTo(String value) {
            addCriterion("afno =", value, "afno");
            return (Criteria) this;
        }

        public Criteria andAfnoNotEqualTo(String value) {
            addCriterion("afno <>", value, "afno");
            return (Criteria) this;
        }

        public Criteria andAfnoGreaterThan(String value) {
            addCriterion("afno >", value, "afno");
            return (Criteria) this;
        }

        public Criteria andAfnoGreaterThanOrEqualTo(String value) {
            addCriterion("afno >=", value, "afno");
            return (Criteria) this;
        }

        public Criteria andAfnoLessThan(String value) {
            addCriterion("afno <", value, "afno");
            return (Criteria) this;
        }

        public Criteria andAfnoLessThanOrEqualTo(String value) {
            addCriterion("afno <=", value, "afno");
            return (Criteria) this;
        }

        public Criteria andAfnoLike(String value) {
            addCriterion("afno like", value, "afno");
            return (Criteria) this;
        }

        public Criteria andAfnoNotLike(String value) {
            addCriterion("afno not like", value, "afno");
            return (Criteria) this;
        }

        public Criteria andAfnoIn(List<String> values) {
            addCriterion("afno in", values, "afno");
            return (Criteria) this;
        }

        public Criteria andAfnoNotIn(List<String> values) {
            addCriterion("afno not in", values, "afno");
            return (Criteria) this;
        }

        public Criteria andAfnoBetween(String value1, String value2) {
            addCriterion("afno between", value1, value2, "afno");
            return (Criteria) this;
        }

        public Criteria andAfnoNotBetween(String value1, String value2) {
            addCriterion("afno not between", value1, value2, "afno");
            return (Criteria) this;
        }

        public Criteria andAtnoIsNull() {
            addCriterion("atno is null");
            return (Criteria) this;
        }

        public Criteria andAtnoIsNotNull() {
            addCriterion("atno is not null");
            return (Criteria) this;
        }

        public Criteria andAtnoEqualTo(String value) {
            addCriterion("atno =", value, "atno");
            return (Criteria) this;
        }

        public Criteria andAtnoNotEqualTo(String value) {
            addCriterion("atno <>", value, "atno");
            return (Criteria) this;
        }

        public Criteria andAtnoGreaterThan(String value) {
            addCriterion("atno >", value, "atno");
            return (Criteria) this;
        }

        public Criteria andAtnoGreaterThanOrEqualTo(String value) {
            addCriterion("atno >=", value, "atno");
            return (Criteria) this;
        }

        public Criteria andAtnoLessThan(String value) {
            addCriterion("atno <", value, "atno");
            return (Criteria) this;
        }

        public Criteria andAtnoLessThanOrEqualTo(String value) {
            addCriterion("atno <=", value, "atno");
            return (Criteria) this;
        }

        public Criteria andAtnoLike(String value) {
            addCriterion("atno like", value, "atno");
            return (Criteria) this;
        }

        public Criteria andAtnoNotLike(String value) {
            addCriterion("atno not like", value, "atno");
            return (Criteria) this;
        }

        public Criteria andAtnoIn(List<String> values) {
            addCriterion("atno in", values, "atno");
            return (Criteria) this;
        }

        public Criteria andAtnoNotIn(List<String> values) {
            addCriterion("atno not in", values, "atno");
            return (Criteria) this;
        }

        public Criteria andAtnoBetween(String value1, String value2) {
            addCriterion("atno between", value1, value2, "atno");
            return (Criteria) this;
        }

        public Criteria andAtnoNotBetween(String value1, String value2) {
            addCriterion("atno not between", value1, value2, "atno");
            return (Criteria) this;
        }

        public Criteria andFnoIsNull() {
            addCriterion("fno is null");
            return (Criteria) this;
        }

        public Criteria andFnoIsNotNull() {
            addCriterion("fno is not null");
            return (Criteria) this;
        }

        public Criteria andFnoEqualTo(String value) {
            addCriterion("fno =", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoNotEqualTo(String value) {
            addCriterion("fno <>", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoGreaterThan(String value) {
            addCriterion("fno >", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoGreaterThanOrEqualTo(String value) {
            addCriterion("fno >=", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoLessThan(String value) {
            addCriterion("fno <", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoLessThanOrEqualTo(String value) {
            addCriterion("fno <=", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoLike(String value) {
            addCriterion("fno like", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoNotLike(String value) {
            addCriterion("fno not like", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoIn(List<String> values) {
            addCriterion("fno in", values, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoNotIn(List<String> values) {
            addCriterion("fno not in", values, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoBetween(String value1, String value2) {
            addCriterion("fno between", value1, value2, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoNotBetween(String value1, String value2) {
            addCriterion("fno not between", value1, value2, "fno");
            return (Criteria) this;
        }

        public Criteria andAfnameIsNull() {
            addCriterion("afname is null");
            return (Criteria) this;
        }

        public Criteria andAfnameIsNotNull() {
            addCriterion("afname is not null");
            return (Criteria) this;
        }

        public Criteria andAfnameEqualTo(String value) {
            addCriterion("afname =", value, "afname");
            return (Criteria) this;
        }

        public Criteria andAfnameNotEqualTo(String value) {
            addCriterion("afname <>", value, "afname");
            return (Criteria) this;
        }

        public Criteria andAfnameGreaterThan(String value) {
            addCriterion("afname >", value, "afname");
            return (Criteria) this;
        }

        public Criteria andAfnameGreaterThanOrEqualTo(String value) {
            addCriterion("afname >=", value, "afname");
            return (Criteria) this;
        }

        public Criteria andAfnameLessThan(String value) {
            addCriterion("afname <", value, "afname");
            return (Criteria) this;
        }

        public Criteria andAfnameLessThanOrEqualTo(String value) {
            addCriterion("afname <=", value, "afname");
            return (Criteria) this;
        }

        public Criteria andAfnameLike(String value) {
            addCriterion("afname like", value, "afname");
            return (Criteria) this;
        }

        public Criteria andAfnameNotLike(String value) {
            addCriterion("afname not like", value, "afname");
            return (Criteria) this;
        }

        public Criteria andAfnameIn(List<String> values) {
            addCriterion("afname in", values, "afname");
            return (Criteria) this;
        }

        public Criteria andAfnameNotIn(List<String> values) {
            addCriterion("afname not in", values, "afname");
            return (Criteria) this;
        }

        public Criteria andAfnameBetween(String value1, String value2) {
            addCriterion("afname between", value1, value2, "afname");
            return (Criteria) this;
        }

        public Criteria andAfnameNotBetween(String value1, String value2) {
            addCriterion("afname not between", value1, value2, "afname");
            return (Criteria) this;
        }

        public Criteria andAfbegintimeIsNull() {
            addCriterion("afbeginTime is null");
            return (Criteria) this;
        }

        public Criteria andAfbegintimeIsNotNull() {
            addCriterion("afbeginTime is not null");
            return (Criteria) this;
        }

        public Criteria andAfbegintimeEqualTo(Date value) {
            addCriterionForJDBCTime("afbeginTime =", value, "afbegintime");
            return (Criteria) this;
        }

        public Criteria andAfbegintimeNotEqualTo(Date value) {
            addCriterionForJDBCTime("afbeginTime <>", value, "afbegintime");
            return (Criteria) this;
        }

        public Criteria andAfbegintimeGreaterThan(Date value) {
            addCriterionForJDBCTime("afbeginTime >", value, "afbegintime");
            return (Criteria) this;
        }

        public Criteria andAfbegintimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCTime("afbeginTime >=", value, "afbegintime");
            return (Criteria) this;
        }

        public Criteria andAfbegintimeLessThan(Date value) {
            addCriterionForJDBCTime("afbeginTime <", value, "afbegintime");
            return (Criteria) this;
        }

        public Criteria andAfbegintimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCTime("afbeginTime <=", value, "afbegintime");
            return (Criteria) this;
        }

        public Criteria andAfbegintimeIn(List<Date> values) {
            addCriterionForJDBCTime("afbeginTime in", values, "afbegintime");
            return (Criteria) this;
        }

        public Criteria andAfbegintimeNotIn(List<Date> values) {
            addCriterionForJDBCTime("afbeginTime not in", values, "afbegintime");
            return (Criteria) this;
        }

        public Criteria andAfbegintimeBetween(Date value1, Date value2) {
            addCriterionForJDBCTime("afbeginTime between", value1, value2, "afbegintime");
            return (Criteria) this;
        }

        public Criteria andAfbegintimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCTime("afbeginTime not between", value1, value2, "afbegintime");
            return (Criteria) this;
        }

        public Criteria andAfendtimeIsNull() {
            addCriterion("afendTime is null");
            return (Criteria) this;
        }

        public Criteria andAfendtimeIsNotNull() {
            addCriterion("afendTime is not null");
            return (Criteria) this;
        }

        public Criteria andAfendtimeEqualTo(Date value) {
            addCriterionForJDBCTime("afendTime =", value, "afendtime");
            return (Criteria) this;
        }

        public Criteria andAfendtimeNotEqualTo(Date value) {
            addCriterionForJDBCTime("afendTime <>", value, "afendtime");
            return (Criteria) this;
        }

        public Criteria andAfendtimeGreaterThan(Date value) {
            addCriterionForJDBCTime("afendTime >", value, "afendtime");
            return (Criteria) this;
        }

        public Criteria andAfendtimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCTime("afendTime >=", value, "afendtime");
            return (Criteria) this;
        }

        public Criteria andAfendtimeLessThan(Date value) {
            addCriterionForJDBCTime("afendTime <", value, "afendtime");
            return (Criteria) this;
        }

        public Criteria andAfendtimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCTime("afendTime <=", value, "afendtime");
            return (Criteria) this;
        }

        public Criteria andAfendtimeIn(List<Date> values) {
            addCriterionForJDBCTime("afendTime in", values, "afendtime");
            return (Criteria) this;
        }

        public Criteria andAfendtimeNotIn(List<Date> values) {
            addCriterionForJDBCTime("afendTime not in", values, "afendtime");
            return (Criteria) this;
        }

        public Criteria andAfendtimeBetween(Date value1, Date value2) {
            addCriterionForJDBCTime("afendTime between", value1, value2, "afendtime");
            return (Criteria) this;
        }

        public Criteria andAfendtimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCTime("afendTime not between", value1, value2, "afendtime");
            return (Criteria) this;
        }

        public Criteria andAfbegindateIsNull() {
            addCriterion("afbeginDate is null");
            return (Criteria) this;
        }

        public Criteria andAfbegindateIsNotNull() {
            addCriterion("afbeginDate is not null");
            return (Criteria) this;
        }

        public Criteria andAfbegindateEqualTo(Date value) {
            addCriterionForJDBCDate("afbeginDate =", value, "afbegindate");
            return (Criteria) this;
        }

        public Criteria andAfbegindateNotEqualTo(Date value) {
            addCriterionForJDBCDate("afbeginDate <>", value, "afbegindate");
            return (Criteria) this;
        }

        public Criteria andAfbegindateGreaterThan(Date value) {
            addCriterionForJDBCDate("afbeginDate >", value, "afbegindate");
            return (Criteria) this;
        }

        public Criteria andAfbegindateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("afbeginDate >=", value, "afbegindate");
            return (Criteria) this;
        }

        public Criteria andAfbegindateLessThan(Date value) {
            addCriterionForJDBCDate("afbeginDate <", value, "afbegindate");
            return (Criteria) this;
        }

        public Criteria andAfbegindateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("afbeginDate <=", value, "afbegindate");
            return (Criteria) this;
        }

        public Criteria andAfbegindateIn(List<Date> values) {
            addCriterionForJDBCDate("afbeginDate in", values, "afbegindate");
            return (Criteria) this;
        }

        public Criteria andAfbegindateNotIn(List<Date> values) {
            addCriterionForJDBCDate("afbeginDate not in", values, "afbegindate");
            return (Criteria) this;
        }

        public Criteria andAfbegindateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("afbeginDate between", value1, value2, "afbegindate");
            return (Criteria) this;
        }

        public Criteria andAfbegindateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("afbeginDate not between", value1, value2, "afbegindate");
            return (Criteria) this;
        }

        public Criteria andAfenddateIsNull() {
            addCriterion("afendDate is null");
            return (Criteria) this;
        }

        public Criteria andAfenddateIsNotNull() {
            addCriterion("afendDate is not null");
            return (Criteria) this;
        }

        public Criteria andAfenddateEqualTo(Date value) {
            addCriterionForJDBCDate("afendDate =", value, "afenddate");
            return (Criteria) this;
        }

        public Criteria andAfenddateNotEqualTo(Date value) {
            addCriterionForJDBCDate("afendDate <>", value, "afenddate");
            return (Criteria) this;
        }

        public Criteria andAfenddateGreaterThan(Date value) {
            addCriterionForJDBCDate("afendDate >", value, "afenddate");
            return (Criteria) this;
        }

        public Criteria andAfenddateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("afendDate >=", value, "afenddate");
            return (Criteria) this;
        }

        public Criteria andAfenddateLessThan(Date value) {
            addCriterionForJDBCDate("afendDate <", value, "afenddate");
            return (Criteria) this;
        }

        public Criteria andAfenddateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("afendDate <=", value, "afenddate");
            return (Criteria) this;
        }

        public Criteria andAfenddateIn(List<Date> values) {
            addCriterionForJDBCDate("afendDate in", values, "afenddate");
            return (Criteria) this;
        }

        public Criteria andAfenddateNotIn(List<Date> values) {
            addCriterionForJDBCDate("afendDate not in", values, "afenddate");
            return (Criteria) this;
        }

        public Criteria andAfenddateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("afendDate between", value1, value2, "afenddate");
            return (Criteria) this;
        }

        public Criteria andAfenddateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("afendDate not between", value1, value2, "afenddate");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}